<template>
	<view style="padding: 30rpx;">
		<view class="" @click="yinsi" style="display: flex;justify-content: space-between;align-items: center;padding-bottom:30rpx;margin-top:30rpx;border-bottom: 1rpx solid rgba(153, 153, 153,.06);">
			<view class="title">隐私政策</view>
			<u-icon name="arrow-right" color="#999" size="20"></u-icon>
		</view>
		<view class="" @click="jumpurl('/pages/tab4/xiugaisjh')" style="display: flex;justify-content: space-between;align-items: center;padding-bottom:30rpx;margin-top:30rpx;border-bottom: 1rpx solid rgba(153, 153, 153,.06);">
			<view class="title">修改手机号</view>
			<u-icon name="arrow-right" color="#999" size="20"></u-icon>
		</view>
		<view class="" @click="jumpurl('/pages/tab4/zhifubxx')" style="display: flex;justify-content: space-between;align-items: center;padding-bottom:30rpx;margin-top:30rpx;border-bottom: 1rpx solid rgba(153, 153, 153,.06);">
			<view class="title">支付宝账户</view>
			<u-icon name="arrow-right" color="#999" size="20"></u-icon>
		</view>
		<view class="" @click="zxBtn" style="display: flex;justify-content: space-between;align-items: center;padding-bottom:30rpx;margin-top:30rpx;border-bottom: 1rpx solid rgba(153, 153, 153,.06);">
			<view class="title">注销账户</view>
			<u-icon name="arrow-right" color="#999" size="20"></u-icon>
		</view>
		
		<moDal :message="modal" @modalSure="modalSure" @modalcancel="modalcancel"></moDal>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				modal: {
					modalShow: false,
					title: "是否确认退出登录?",
				},
			}
		},
		methods: {
			zxBtn() {
				this.modal.title = "是否确认注销?"
				this.modal.modalShow = true
			
			},
			modalSure() {
				let _this = this;
				httpRequest.request('/api/user/zxUser', 'GET', {
							
				}).then(resp => {
					if (resp.code == 1) {
						uni.removeStorageSync('token');
						uni.removeStorageSync('user_id');
						httpRequest.toast(resp.msg)
						setTimeout(() => {
							uni.navigateBack(1)
						}, 1000)
					} else {
						httpRequest.toast(resp.msg)
					}
				})
				this.modalcancel()
			},
			modalcancel() {
				this.modal.modalShow = false
			},
			yinsi() {
				uni.navigateTo({
					url: '/pages/login/xy?type=2'
				})
			},
		}
	}
</script>

<style lang="scss" scoped>

</style>
